<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>jsonp跨域</title>

    <script type="text/javascript">
        // 解析json数据
        function  showMsg(data){
            alert(data);
            console.info(data);
            if(data.length>0){
                alert(data[0].adminname+data[0].adminage)
            }else{
                alert("没有数据");
            }
        }
    </script>

    <!--使用script的标签的src属性，进行跨域请求远程的js资源文件-->
    <script type="text/javascript" src="http://localhost:8090/servlet20190625_jsonp/AdminInfoAjaxQueryJsonpAction?callback=showMsg">
        /*
        showMsg([{"adminage":21,"adminname":"张酸钠","amdinaddress":"天津西青"}]);
        */
    </script>
</head>
<body>
跨域请求的实例
</body>
</html>